<template>
	<view class="mainpadding">
		<template v-if="type==1">
			<!-- 使用导向 -->
			<u-parse :content="systeminfo.use_des"></u-parse>
		</template>
		<template v-if="type==2">
			<!-- 用户协议 -->
			<u-parse :content="systeminfo.user_xy"></u-parse>
		</template>
		<template v-if="type==3">
			<!-- 隐私政策 -->
			<u-parse :content="systeminfo.user_yszc"></u-parse>
		</template>
		<template v-if="type==4">
			<!-- 服务协议 -->
			<u-parse :content="systeminfo.service_des"></u-parse>
		</template>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				type: 1,
				text:"使用导向",
				systeminfo:{}
			}
		},
		onLoad(options) {
			this.type = options.id
			let text = ""
			if (this.type == 1) {
				this.text = "使用导向"
			} else if (this.type == 2) {
				this.text = "用户协议"
			} else if (this.type == 3) {
				this.text = "隐私政策"
			}else if (this.type == 4) {
				this.text = "服务协议"
			}
			uni.setNavigationBarTitle({
				title: this.text
			});
			this.system()
		},
		methods: {
system(){
				httpRequest.request('/api/index/getConfigInfo','GET',{}).then(res => {
					this.systeminfo = res.data
				})
			}
		}
	}
</script>

<style>

</style>